@extends('default.layouts.adminPublic')
@section('title', '注册基本信息')
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/admin/indexList.css')}}">
    @endsection
    @section('content')
            <!--导航开始-->
    <div class="crumb_warp">
        <i class="fa fa-home"></i> <a href="{{url('admin/com_basic_reg')}}">首页</a> &raquo; 注册基本信息
    </div>
    <!--导航结束-->
    <!--结果集标题与导航组件 开始-->

    <div class="con">
        <div class="conMain">
            <div class="result_wrap">
                <div class="search">
                    <form name="Formso" id="Formso" action="{{url('admin/com_basic_reg')}}" method="post">
                        {{csrf_field()}}
                        <span>关键字：</span>
                        <span><input name="keyword" class="keyword" id="keyword" placeholder="请输入公司名称" type="text"></span>
                        <span><input name="submit" class="skeyword" value="搜索" type="submit"></span>
                    </form>
                </div>
                <div class="message"><p>目前共查找到<strong>{{$companyBasic->total()}}</strong>个基本信息！且每页显示{{$companyBasic->perPage()}}个基本信息。</p></div>
            </div>
            <div class="manage">
                @include('flash::message')
            </div>
            <div class="conInfo">
                <form name="thisForm" id="thisForm" action="" method="post">
                    {{csrf_field()}}
                    <div class="conList" id="conList">
                        <dl class="one">
                            <dt><input name="selectall" type="checkbox" value="1" onclick="CheckAll(this)" /></dt>
                            <dd class="pc1">公司ID</dd>
                            <dd class="pc3">公司名称</dd>
                            <dd class="pc5">联系人</dd>
                            <dd class="pc4">手机号码</dd>
                            <dd class="pc2">固定电话</dd>
                            <dd class="pc7" style="width: 30%">操作</dd>
                        </dl>
                        @if($companyBasic->count() > 0 )
                            @foreach($companyBasic as $v)
                                <dl id="list{{$v->id}}">
                                    <dt><input name="selected_id[]" type="checkbox" value="{{$v->id}}" /></dt>
                                    <dd class="pc1">{{$v->id}}</dd>
                                    @if(isset($v->companyUser) && $v->companyUser->viptime>date('Y-m-d,H:i:s'))
                                        <dd class="pc3"><a href="{{url('comabout_'.idEncryption($v->id).'.html')}}" target="_blank">{{str_limit($v->company_name,28)}}</a> <b style="color: #f43838">vip</b></dd>
                                    @else
                                        <dd class="pc3"><a href="{{url('comabout_'.idEncryption($v->id).'.html')}}" target="_blank">{{str_limit($v->company_name,28)}}</a></dd>
                                    @endif
                                    <dd class="pc5">{{str_limit($v->contacts,14)}}</dd>
                                    <dd class="pc4">{{$v->mobile}}</dd>
                                    <dd class="pc2">{{$v->phone}}</dd>
                                    <dd class="pc7" style="width: 30%">
                                        <span><a href="{{url('admin/ad_manage/create?com_id='.$v->id)}}">发布广告</a></span>
                                        <span><a href="{{url('admin/contract/'.$v->uid)}}">签合同</a></span>
                                        <span><a href="{{url('admin/company_welcome/'.$v->uid)}}" target="_blank">账户中心</a></span>
                                        <span><a href="{{url('admin/com_user_mod/'.$v->uid)}}">注册信息</a></span>
                                        <span><a href="{{url('admin/micro_job/'.$v->id)}}" target="_blank">微导出</a></span>
                                    </dd>
                                </dl>
                            @endforeach
                        @else
                            <div class="nullcon">对不起！没有符合条件的记录！</div>
                        @endif
                        <dl class="last">
                            <dt>
                                <input name="selectall" id="selectall" type="checkbox" value="1" onclick="CheckAll(this)" />
                                <label for="selectall">全选</label>
                            </dt>
                        </dl>
                    </div>
                </form>
                <div class="page_list" style="width: 100%; float: left; margin-top:15px;">
                    {!! $companyBasic->appends($input)->links() !!}
                </div>
            </div>

            <div class="stopper" style="margin-top:10px; border-top: 1px solid #e5e5e5"></div>
        </div>
    </div>
    <!--结果集标题与导航组件 结束-->
@endsection

@section('footerjs')
    @parent
    <script>
        //全选中与全不选中职位资料
        function CheckAll(form){
            if (form.checked==true){
                for (var i=0;i<document.thisForm.elements.length;i++){
                    var e = document.thisForm.elements[i];
                    if (e.name == 'selectedid' || e.name=='selected_id[]' || e.name=='selectall')
                        e.checked=true;
                }
            }else{
                for (var i=0;i<document.thisForm.elements.length;i++){
                    var e = document.thisForm.elements[i];
                    if (e.name == 'selectedid' || e.name=='selected_id[]' || e.name=='selectall')
                        e.checked=false;
                }
            }
        }
        $(function(){

        });
    </script>
@endsection